#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include "game.h"

class QLabel;

namespace Ui {
class MainWindow;
}

static void createNewGame(Game ** gh, Canvas * ca) {
    RussianBlock * new_rb = new RussianBlock();
    new_rb->Create(ca);
    *gh = new_rb;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actionstart_triggered();

    void doFlush();
    void on_actionstop_triggered();

    void on_actionrandom_triggered();

    void on_actionroll_triggered();

    void on_actionend_triggered();

protected:
    void closeEvent(QCloseEvent *event);
    void keyPressEvent(QKeyEvent *e);
    void keyReleaseEvent(QKeyEvent *e);

private:
    Ui::MainWindow *ui;

    Game* russian_block;
    QLabel *statusLabel;
    QLabel *permanent;
};

#endif // MAINWINDOW_H
